package gui.panels;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.SQLException;

import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.undo.UndoManager;

public class PanelButtons extends JPanel {
	private JButton jButtonDel;
	private JButton jButtonAdd;
	private JButton jButtonOk;
	private JButton jButtonCancel;
	private JButton jButtonEdit;
	private JButton jButtonCancelEdit;
	private JButton jButtonOkEdit;
	
	public PanelButtons(){
		initGui();
	}
	public void initGui(){
		{
		// delet button
		Box layout = Box.createHorizontalBox();

		layout.add(Box.createHorizontalGlue());
		// ButtonPanel.setLayout(layout);
		{
			jButtonDel = new JButton();
			jButtonDel.setText("-");
			layout.add(jButtonDel);
		}
		// InsertButton
		{
			jButtonAdd = new JButton();
			jButtonAdd.setText("+");
			layout.add(jButtonAdd);
		}
		// OkButton
		{
			jButtonOk = new JButton();

			jButtonOk.setText("Ok");
			jButtonOk.setVisible(false);
			layout.add(jButtonOk);
		}
		// cancel button
		{
			jButtonCancel = new JButton();
			jButtonCancel.setText("Cancel");
			jButtonCancel.setPreferredSize(new java.awt.Dimension(90, 21));
			jButtonCancel.setVisible(false);
			layout.add(jButtonCancel);
		}
		
		layout.add(Box.createRigidArea(new Dimension(50, 0)));
		// edit
		{
			jButtonEdit = new JButton();
			jButtonEdit.setText("Edit");
			jButtonEdit.setPreferredSize(new java.awt.Dimension(80, 21));
			jButtonEdit.setVisible(true);
			
			layout.add(jButtonEdit);
		}
		// cancel edit
		{
			jButtonCancelEdit = new JButton();
			jButtonCancelEdit.setText("CancelEdit");
			jButtonCancelEdit.setPreferredSize(new java.awt.Dimension(80,21));
			jButtonCancelEdit.setVisible(false);
			
			layout.add(jButtonCancelEdit);
		}
			layout.add(Box.createHorizontalGlue());
			
		

		{
			jButtonOkEdit = new JButton();
			jButtonOkEdit.setText("OkEdit");
			jButtonOkEdit.setPreferredSize(new java.awt.Dimension(80, 21));
			jButtonOkEdit.setVisible(false);

			layout.add(jButtonOkEdit);
		}
			layout.add(Box.createHorizontalGlue());

		
		this.add(layout);
		}
	}
	
	public JButton getButtonDel(){
		return jButtonDel;
	}
	
	public JButton getButtonAdd(){
		return jButtonAdd;
	}
	
	public JButton getButtonOk(){
		return jButtonOk;
	}
	public JButton getButtonCancel(){
		return jButtonCancel;
	}
	public JButton getButtonEdit(){
		return jButtonEdit;
	}
	public JButton getButtonOkEdit(){
		return jButtonOkEdit;
	}
	public JButton getButtonCancelEdit(){
		return jButtonCancelEdit;
	}
}
